/*
 * @Description: 
 * @Version: 2.0
 * @Autor: ftt
 * @Date: 2022-06-10 14:27:18
 * @LastEditors: TT
 * @LastEditTime: 2022-06-20 15:20:19
 */

import 'package:flutter/widgets.dart';
import 'package:hzy_normal_widget/hzy_normal_widget.dart';
import '../../pages/login_module/routers/login_page_id.dart';
import '../../utils/utils_tool.dart';

class RoutersMiddileWare extends GetMiddleware {
  @override
  RouteSettings? redirect(String? route) {
    if (!UtilsTool.userislogin()) {
      return const RouteSettings(name: LoginPageId.login);
    }
    return super.redirect(route);
  }
}
